﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MonthWorkLoadAttendanceReport.aspx.cs" Inherits="Basic4Net.OAWeb.Module_Report.MonthWorkLoadAttendanceReport" %>

<%@ Register Assembly="Controls" Namespace="Basic4Net.Controls" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>工作月教职工月岗位工作量及考勤统</title>
     <link type="text/css" rel="stylesheet" href="../App_Themes/ui-lightness/main.css" />
    <script type="text/javascript" src="../Scripts/jquery-1.4.1.js"></script>
    <script type="text/javascript" src="../Scripts/Common.js"></script>   
    <script>

        //选中行高亮
        function SetHightLight(obj) {
            if (obj != null)
                obj.style.backgroundColor = "#fffccf";

            var table = document.getElementById('table');
            for (var i = 0; i < table.rows.length; i++) {
                var row = table.rows[i];
                if (row != null && row.rowIndex != obj.rowIndex) {
                    row.style.backgroundColor = "#ffffff";
                }
            }
        }


        function Bind() {
            document.getElementById('TeachCode').value = document.getElementById('txtTeachCode').value;

            document.getElementById('btnItemBind').click();
        }
    </script>
</head>
<body onload="myload();">
    <form id="form1" runat="server">
   <div style="overflow-y: auto; overflow-x: none; height: 98%;">
            <div class="mainWarp">
                <div class="pageBody" style="height: 96%;">
                    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
                    </asp:ScriptManager>  
                        
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                        <ul class="butList">
                             <li>
                                <asp:DropDownList ID="dropMonth" runat="server" OnSelectedIndexChanged="DrMonthChanged"   AutoPostBack="True">
                                    
                                </asp:DropDownList> 
                            </li>
                           <%-- <li>
                                <asp:DropDownList ID="dropList1" runat="server" OnSelectedIndexChanged="DrPostChanged" AutoPostBack="True">
                                    
                                </asp:DropDownList> 
                            </li>--%>
                             <li>
                                输入姓名或工号：<input id="txtTeachCode" type="text" /><%--姓名:<input id="txtTeachName" type="text" />--%>
                             </li>
                            <li>
                                <input type="button" value="查询" class="commonBut" id="btnAddItem" onclick="Bind();" />
                            </li> 
                        </ul>  
                                
                        <div style="overflow-y: auto; overflow-x: none; height: 90%;">
                            <table id="table" class="useList1" style="width: 95%">
                             <asp:Repeater ID="Repeater1" runat="server">    
                             <HeaderTemplate>
                               <%--<tr > 
                                   <th  style="text-align: left; padding-left: 5px;width: 10%">
                                        工号</th> 
                                      <th style="text-align: left; padding-left: 5px;width: 10%">
                                        姓名</th>
                                   
                                  
                                </tr>--%>
                                 <%# GetHeadInfo() %>
                            </HeaderTemplate>
                            <ItemTemplate> 
                                <tr itemid="<%# Eval("TeacherID")%>"  
                                                    onclick="SetHightLight(this);" > 
                                    <td style="text-align: left; padding-left: 5px;"><%# Eval("TeachCode")%></td>
                                    <td style="text-align: left; padding-left: 5px;"><%# Eval("TeachName")%></td>
                                   <%-- <td style="text-align: left; padding-left: 5px;"><%# Eval("HolidayWork")%></td>
                                    <td style="text-align: left; padding-left: 5px;"></td>--%>
                                    <%# GetTdInfo((int)Eval("TeacherID"))%>
                                     </tr> 
                            </ItemTemplate>
                            </asp:Repeater> 
                        </table> 
                        </div>  
                     <div style=" text-align:left; padding-top:8px;">
                            <webdiyer:BNPager ID="aspNetPager" runat="server" PageSize="15" Width=680
                             OnPageChanged="AspNetPagerPageChanged">
                            </webdiyer:BNPager>
                         </div>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnItemBind" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="aspNetPager" EventName="PageChanged" />
                </Triggers>
            </asp:UpdatePanel>

            <%--服务器端控件层--%>
            <div style="display:none;">
                <asp:Button runat="server" ID="btnItemBind" onclick="btnItemBind_Click"   />
                <asp:TextBox runat="server" ID="TeachName" />
                <asp:TextBox runat="server" ID="TeachCode" /> 
            </div>
                  
               
            </div>
        </form>
</body>
</html>
<script type="text/javascript">
    function myload() {
        Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(EndRequestHandler);
    }
    function EndRequestHandler() {
        $("input[type='submit']").addClass("commonBut");
    }

    $("input[type='submit']").addClass("commonBut");
</script>